package Day14;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class GetPanel extends JPanel implements ActionListener {
    private JLabel getLabel = new JLabel("金额");
    private JTextField getField = new JFormattedTextField();
    private JButton sureBtn = new JButton(new ImageIcon("Image/buttonSure.jpg"));
    private Font font = new Font("宋体",Font.BOLD,20);
    private ATM05 atm05;
    public GetPanel(ATM05 atm05){
        this.atm05 = atm05;
        this.setLayout(null);
        this.setOpaque(false);

        getLabel.setBounds(250,200,80,50);
        getLabel.setFont(font);
        this.add(getLabel);

        getField.setBounds(380,200,250,50);
        getField.setFont(font);
        this.add(getField);

        sureBtn.setBounds(450,320,140,50);
        sureBtn.addActionListener(this);
        this.add(sureBtn);

    }
    @Override
    public void actionPerformed(ActionEvent e) {
        atm05.showPanel("menu");
    }
}
